package 合成复用原则;

/**
 * @ClassNameMain
 * @Description
 * @Author
 * @Date2021/11/16 20:35
 **/
public class Main {
    public static void main(String[] args) {

        // 红色电动车
        ElectricCar electricCar = new ElectricCar(new Red());
        electricCar.move();

        // 黄色燃油车
        GasolineCar gasolineCar = new GasolineCar(new Yellow());
        gasolineCar.move();

    }
}
